package com.dark.trident;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import storm.trident.operation.BaseFunction;
import storm.trident.operation.TridentCollector;
import storm.trident.tuple.TridentTuple;

/**
 * Created by tengxue on 16-7-1.
 */
public class DispatchAlter extends BaseFunction {

    private static final long serialVersionUID=1L;

    private static final Logger LOG= LoggerFactory.getLogger(HourAssignment.class);

    @Override
    public void execute(TridentTuple tuple, TridentCollector collector) {
        String alert=(String)tuple.getValue(0);
        LOG.info("ALTER RECEIVED ["+ alert+"]");
        LOG.info("Dispatch the national guard !");
        System.exit(0);
    }
}
